package com.example.demo.service;

import com.example.demo.entity.*;

import java.util.Date;


public interface CustomerService {
    /**
     * 用户注册
     *
     * @param customer
     * @return
     */
    JsonResult addCustomer(Customer customer);

    /**
     * 用户登录
     *
     * @param customer
     * @return
     */
    JsonResult login(Customer customer);

    /**
     * 修改密码
     *
     * @param customer
     * @return
     */
    JsonResult upPassword(Customer customer);

    /**
     * 判断是否认证会员
     *
     * @param phone
     * @return
     */
    Integer judgeState(String phone);

    /**
     * 开通会员开始工作
     *
     * @param workTable
     * @return
     */
    JsonResult startMemberWork(WorkTable workTable);

    /**
     * 没开通会员开始工作
     *
     * @param workTable
     * @return
     */
    JsonResult startNoMemberWork(WorkTable workTable);


    /**
     * 进入页面前进行判断，是否还有工作未完成
     * @return
     */
    JsonResult loginMemberJudge(String phone);
    JsonResult loginNoMemberJudge(String phone);

    /**
     * 上传已经走得时间，和赚的金钱
     *
     * @param workTable
     * @return
     */
//    JsonResult updateMemberWork(WorkTable workTable);
    /**
     * 上传已经走得时间，和赚的金钱
     *
     * @param workLogs
     * @return
     */
    JsonResult updateNoMemberWork(WorkLogs workLogs);

    /**
     * 结束工作
     *
     * @param workTable
     * @return
     */
    JsonResult endMemberWork(WorkTable workTable);
    /**
     * 结束工作
     *
     * @param workTable
     * @return
     */
    JsonResult endNoMemberWork(WorkTable workTable);

    /**
     * 获取主页的所有数据
     *
     * @param phone
     * @return
     */
    JsonResult main(String phone);

    /**
     * 获取个人中心所有数据
     *
     * @param phone
     * @return
     */
    JsonResult personal(String phone);

    /**
     * localhost:6080/customer/material?materialType=1
     * 根据类型不同查询视频，推广，Q&A
     *
     * @param materialType
     * @return
     */
    JsonResult material(String materialType);


    /**
     * 提现记录
     *
     * @param phone
     * @return
     */
    JsonResult withdrawals(String phone);
    JsonResult isBinding(String phone);


    /**localhost:6080/customer/verificationCode?phone=18712882023
     * 注册,获取验证码
     * @return
     */
    JsonResult saveVerificationCode(String phone);


    /**
     * 获取微信openID
     * @return
     */
    JsonResult getOpenId(String code,String phone) throws Exception;

    /**
     * 获取工作每秒的价格区间
     * @return
     */
    JsonResult getSecondEarn();
    BaseInfo getBaseInfo();
    /**
     * 如果断网等错误 再次登录获取
     * @param error
     * @return
     */
    JsonResult getError(Integer error,String phone);
    JsonResult getErrorNoMember(Integer error,String phone);
    /**
     * 获取当前等级可提现金额总数和已提现金额
     * @param phone
     * @return
     */
    JsonResult getAmountLimit(String phone);

    Date getStartTime(String phone);
    Date getUpdateTime(String phone);

    /**
     * 用户提取押金
     * @param phone
     * @return
     */
    JsonResult applyRefund(String phone);

    /**
     * 判断是否认证会员成功
     * @param phone
     * @return
     */
    JsonResult judgeMember(String phone);

    /**
     * 轮循通知
     * @return
     */
    JsonResult circularNotification();


    /**
     * 会员结束12小时工作
     * @param workTable
     * @return
     */
    JsonResult endAllWork( WorkTable workTable);

    /**
     * 非会员结束20分钟工作
     * @param workTable
     * @return
     */
    JsonResult endAllWorkNoMember( WorkTable workTable);

    /**
     * 获取域名
     * @return
     */
    String getUrl();
}
